package com.wenkang.stu.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import org.apache.http.HttpStatus;

@Getter
@NoArgsConstructor
@AllArgsConstructor
public enum ExceptionEnums {

    LOGIN_INFO_ERROR(HttpStatus.SC_BAD_REQUEST, "账号或密码错误"),
    PHONE_ERROR(HttpStatus.SC_BAD_REQUEST, "手机号错误"),
    CODE_ERROR(HttpStatus.SC_BAD_REQUEST, "验证码错误"),
    USERNAME_CANNOT_BE_NULL(HttpStatus.SC_BAD_REQUEST, "账号不能为空"),
    ACCOUNT_NOT_EXISTS(HttpStatus.SC_NOT_FOUND, "用户不存在"),
    ACCOUNT_NOT_FIND(HttpStatus.SC_NOT_FOUND, "用户数据未找到"),
    USER_NOT_FIND(HttpStatus.SC_NOT_FOUND, "用户数据未找到"),
    NOT_LOG(HttpStatus.SC_UNAUTHORIZED, "未登录"),
    PERMISSION_DENIED(HttpStatus.SC_FORBIDDEN, "权限不足"),
    UPLOAD_IMAGE_ERROR(HttpStatus.SC_INTERNAL_SERVER_ERROR, "文件上传失败"),
    INVALID_FILE_TYPE(HttpStatus.SC_BAD_REQUEST, "文件类型不匹配"),
    REGISTER_ERROR(HttpStatus.SC_INTERNAL_SERVER_ERROR, "注册失败"),
    CREATED_ERROR(HttpStatus.SC_INTERNAL_SERVER_ERROR, "添加失败"),
    UPDATE_ERROR(HttpStatus.SC_INTERNAL_SERVER_ERROR, "更新失败"),
    DELETE_ERROR(HttpStatus.SC_INTERNAL_SERVER_ERROR, "删除失败"),
    ;

    private Integer code;
    private String msg;

}
